<%@ page language="java" import="java.util.*,dao.*,entity.*"
	contentType="text/html; charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%> 
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'bookDetails.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
    
	
    <style type="text/css">
	   div{
	      float:left;
	      margin-left: 30px;
	      margin-right:30px;
	      margin-top: 5px;
	      margin-bottom: 5px;
	   }
	   div dd{
	      margin:0px;
	      font-size:10pt;
	   }
	   div dd.dd_name
	   {
	      color:blue;
	   }
	   div dd.dd_city
	   {
	      color:#000;
	   }
	</style>
    
	
</head>

<body>
  
	 <h1>图书详情</h1> <form action="${pageContext.request.contextPath }/servlet/IndexBookCheckServlet" method="post">
        <input  type="submit" value="返回" class="" id="">  
       
     </form>
    <hr>
    <center>
      <table width="750" height="60" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <!-- 图书详情 -->
          
          <td width="70%" valign="top">
             <table>
               <tr>
                 <td rowspan="8"><img src="images/${book.bookid}.jpg" width="200" height="250" border="1"/></td>
               </tr>
               <tr>
                 <td>图书号:<B>${book.bookid}</B></td> 
               </tr>
               <tr>
                 <td>图书名：${book.bookname}</td>
               </tr>
               <tr>
                 <td>作者：${book.editor}</td>
               </tr> 
               <tr>
                 <td>出版社：${book.publish}</td> 
               </tr>
               <tr>
                 <td>出版日期：${book.pubdate}</td>
               </tr>
               <tr>
                 <td>价格：${book.price}</td>
               </tr> 
               <tr>
                 <td>库存量：${book.qty}</td>
               </tr> 
             </table>
          </td>
          
       
          
          <!-- 浏览过的商品 -->
          <td width="30%" bgcolor="#C0C0C0" align="center">
             <br>
             <b>您浏览过的书籍 </b><br>
             <!-- 循环开始 -->
            <c:forEach items="${bookList}" var="item">
             <div>
             <dl>
               <dt>
                 <a href="${pageContext.request.contextPath }/servlet/BookDetails?bookid=${item.bookid }"><img src="images/${item.bookid}.jpg" width="100" height="120" border="1"/></a>
               </dt>
               <dd class="dd_name">${item.bookname }</dd> 
               <dd class="dd_city">作者:${item.editor}&nbsp;&nbsp;库存量:${item.qty} </dd> 
             </dl>
             </div>
             </c:forEach>
             
             <!-- 循环结束 -->
          </td>
        </tr>
      </table>
    
     
    </center>

</body>
</html>
